<!-- 
舱内治疗评估
-->

<template>
  <div>
    <el-button @click="dayin">打印</el-button>
    <el-form :model="formData" ref="vForm" label-position="left" label-width="120px" size="medium" style="font-size: 16px;" @submit.native.prevent>
      <div class="static-content-item-head center">
        <div class="static-content-item">
          <div>姓名：</div>
          <div>{{user.patientName}}</div>
        </div>
        <div class="static-content-item">
          <div>性别：</div>
          <div>{{getGender}}</div>
        </div>
        <div class="static-content-item">
          <div>科室：</div>
          <div>{{user.department}}</div>
        </div>
        <div class="static-content-item">
          <div>床号：</div>
          <div>{{user.bedNum}}</div>
        </div>
        <div class="static-content-item">
          <div>病案号：</div>
          <div>{{user.admissionNum}}</div>
        </div>
      </div>
      <div class="center">
        <el-divider direction="horizontal"></el-divider>
      </div>
      <div>
        <div class="record-title">舱内治疗评估</div>
      </div>
      <div class="static-content-title">
        <div>患者情况</div>
      </div>
      <div class="center">
        <el-form-item label="主诉" prop="mainComplaints">
          <el-checkbox-group :disabled="disabled" v-model="formData.mainComplaints">
            <el-checkbox v-for="(item, index) in mainComplaintsOptions" :key="index" :label="item.value" :disabled="item.disabled" style="display: inline">{{ item.label }}</el-checkbox>
          </el-checkbox-group>
          <el-input type="text" :disabled="disabled" v-model="formData.mainComplaintsOther" placeholder="请输入其他" />
        </el-form-item>
        <el-form-item label="不适症状" prop="discomfortSymptoms">
          <el-checkbox-group :disabled="disabled" v-model="formData.discomfortSymptoms">
            <el-checkbox v-for="(item, index) in discomfortSymptomsOptions" :key="index" :label="item.value" :disabled="item.disabled" style="display: inline">{{ item.label }}</el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <div class="static-content-title">
          <div>处理措施</div>
        </div>
        <el-form-item label="汇报" prop="report">
          <el-checkbox-group :disabled="disabled" v-model="formData.report">
            <el-checkbox v-for="(item, index) in reportOptions" :key="index" :label="item.value" :disabled="item.disabled" style="display: inline">{{ item.label }}</el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="呼叫" prop="callInfo">
          <el-checkbox-group :disabled="disabled" v-model="formData.callInfo">
            <el-checkbox v-for="(item, index) in callInfoOptions" :key="index" :label="item.value" :disabled="item.disabled" style="display: inline">{{ item.label }}</el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="处理措施" prop="treatmentMeasures">
          <el-checkbox-group :disabled="disabled" v-model="formData.treatmentMeasures">
            <el-checkbox v-for="(item, index) in treatmentMeasuresOptions" :key="index" :label="item.value" :disabled="item.disabled" style="display: inline">{{ item.label }}</el-checkbox>
          </el-checkbox-group>
          <el-input type="text" :disabled="disabled" v-model="formData.treatmentMeasuresOther" placeholder="请输入其他" />
        </el-form-item>
        <el-form-item label="操舱人员签名" prop="checkbox84336" width="120px" style="margin: 20px 0;">
          <el-input :disabled="disabled" type="text" v-model="formData.operator" placeholder="医师签名" />
        </el-form-item>
      </div>
    </el-form>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    user: { type: Object, default: () => ({}) }, // 用户信息
    data: { type: Object, default: () => ({}) }, // 表单信息
  },
  data() {
    return {
      formData: {
        mainComplaints: [],
        discomfortSymptoms: [],
        report: [],
        callInfo: [],
        treatmentMeasures: [],
        mainComplaintsOther: null, // 主诉其它
        treatmentMeasuresOther: null, // 处理措施其它
        operator: null, // 持仓人
      },
      disabled: true,
      rules: {},
      mainComplaintsOptions: [{
        "label": "胸闷",
        "value": 1
      }, {
        "label": "胸痛",
        "value": 2
      }, {
        "label": "头痛",
        "value": 3
      }, {
        "value": 4,
        "label": "头晕"
      }, {
        "value": 5,
        "label": "恶心"
      }, {
        "value": 6,
        "label": "呕吐"
      }, {
        "value": 7,
        "label": "腹痛"
      }, {
        "value": 8,
        "label": "牙痛"
      }, {
        "value": 9,
        "label": "呼吸困难"
      }, {
        "value": 10,
        "label": "心悸"
      }, {
        "value": 11,
        "label": "无不适"
      }, {
        "value": 12,
        "label": "耳闷（左耳）"
      }, {
        "value": 13,
        "label": "耳闷（右耳）"
      }, {
        "value": 14,
        "label": "耳痛（左耳）"
      }, {
        "value": 15,
        "label": "耳痛（右耳）"
      }, {
        "value": 16,
        "label": "心律偏快"
      }, {
        "value": 17,
        "label": "心律偏慢"
      }, {
        "value": 18,
        "label": "血压偏高"
      }, {
        "value": 19,
        "label": "血压偏低"
      }, {
        "value": 20,
        "label": "皮疹（头面部）"
      }, {
        "value": 21,
        "label": "皮疹（躯干）"
      }, {
        "value": 22,
        "label": "皮疹（双上肢）"
      }, {
        "value": 23,
        "label": "皮疹（双下肢）"
      }, {
        "value": 24,
        "label": "耳道少量流血（左侧）"
      }, {
        "value": 25,
        "label": "耳道少量流血（右侧）"
      }, {
        "value": 26,
        "label": "鼻腔少量流血（左侧）"
      }, {
        "value": 27,
        "label": "鼻腔少量流血（右侧）"
      }, {
        "value": 28,
        "label": "呼吸急促"
      }, {
        "value": 29,
        "label": "肢体躁动明显"
      }, {
        "value": 30,
        "label": "有暴力倾向"
      }, {
        "value": 31,
        "label": "大汗淋漓"
      }, {
        "value": 32,
        "label": "可见明显肉眼血尿"
      }, {
        "value": 33,
        "label": "其他"
      }],
      discomfortSymptomsOptions: [{
        "label": "好转",
        "value": 1
      }, {
        "label": "无缓解",
        "value": 2
      }, {
        "label": "舱内拒绝吸氧，不能配合治疗",
        "value": 3
      }],
      reportOptions: [{
        "label": "高压氧医生",
        "value": 1
      }, {
        "label": "主管医生",
        "value": 2
      }, {
        "label": "科主任",
        "value": 3
      }],
      callInfoOptions: [{
        "label": "医生",
        "value": 1
      }, {
        "label": "RRT",
        "value": 2
      }, {
        "label": "999",
        "value": 3
      }],
      treatmentMeasuresOptions: [{
        "label": "适当约束",
        "value": 1
      }, {
        "label": "家属陪伴在旁",
        "value": 2
      }, {
        "label": "护工陪伴在旁",
        "value": 3
      }, {
        "value": 4,
        "label": "改一级供养"
      }, {
        "value": 5,
        "label": "暂停加压"
      }, {
        "value": 6,
        "label": "继续加压"
      }, {
        "value": 7,
        "label": "指导小口饮水"
      }, {
        "value": 8,
        "label": "指导捏鼻挂起动作"
      }, {
        "value": 9,
        "label": "予心理安慰"
      }, {
        "value": 10,
        "label": "无特殊处理，继续观察"
      }, {
        "value": 11,
        "label": "暂停高压氧治疗"
      }, {
        "value": 12,
        "label": "现遵医嘱予减压出舱"
      }, {
        "value": 13,
        "label": "医护人员陪同，护送回病房"
      }, {
        "value": 14,
        "label": "建议稍后复测血压"
      }, {
        "value": 15,
        "label": "患者治疗后血压高，无明显不适主诉及症状，已汇报医生，无特殊处理，建议回病房后复测"
      }, {
        "value": 16,
        "label": "治疗过程中，心率减慢，无明显不适主诉及症状，已汇报医生，无特殊处理，继续观察"
      }, {
        "value": 17,
        "label": "其他"
      }],
    }
  },
  computed: {},
  watch: {},
  created() {
    this.handle();
    this.getRoute();
  },
  mounted() { },
  methods: {
    getRoute() {
      let { type = 2 } = this.$route.query;
      this.disabled = !!type;
    },
    handle() {
      console.log(this.data);
      Object.keys(this.formData).forEach(key => {
        if (this.data[key]) {
          this.formData[key] = this.data[key]
        }
      })
    },
    submitForm() {
      return this.formData;
    },
    resetForm() {
      this.$refs['vForm'].resetFields()
    },
    dayin() {
      this.$print(this.$refs.vForm)
    }

  }
}

</script>

<style lang="scss" scoped>
.center {
  width: 80%;
  margin: 0 auto;
}

.record-title {
  font-size: 27px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}

.static-content-title {
  font-size: 18px;
  text-align: center;
  margin: 15px 0;
}

el-form {
  font-family: SimSun, serif;
}

.el-checkbox-group {
  float: left;
}

.static-content-item {
  min-height: 20px;
  display: flex;
  align-items: center;
  margin-right: 20px;

  ::v-deep .el-divider--horizontal {
    margin: 0;
  }
}

.static-content-item-head {
  min-height: 20px;
  font-size: 16px;
  display: flex;

  ::v-deep .el-divider--horizontal {
    margin: 0;
  }
}

::v-deep .el-divider--horizontal {
  margin: 0;
}

.el-form-item--small.el-form-item {
  margin-bottom: 0px;
}

.el-form-item {
  margin-bottom: 0px;
}

//宽度
.w-50 {
  width: 50px;
}

.w-100 {
  width: 100px;
}

.w-150 {
  width: 150px;
}

.w-200 {
  width: 200px;
}

.p-10 {
  padding: 10px 0;
}

.p-20 {
  padding: 20px 0;
}

// 去除input样式
input {
  width: 100%;
}
</style>